import axios from '@/libs/api.request'

// 查询分类列表
export const getClassifyList = (data) => {
  return axios.request({
    url: '/product/category/list',
    method: 'post',
    data: data
  })
}

// 新增分类
export const addClassify = (data) => {
  return axios.request({
    url: '/product/category/create',
    method: 'post',
    data: data
  })
}

// 删除分类
export const delClassify = (data) => {
  return axios.request({
    url: '/product/category/delete',
    method: 'post',
    data: data
  })
}

// 查看
export const detailClassify = (data) => {
  return axios.request({
    url: '/product/category/get',
    method: 'post',
    data: data
  })
}

// 编辑分类
export const editClassify = (data) => {
  return axios.request({
    url: '/product/category/edit',
    method: 'post',
    data: data
  })
}

// 转移商品
export const transferProduct = (data) => {
  return axios.request({
    url: '/product/category/goods/migrate',
    method: 'post',
    data: data
  })
}

// 商品属性列表
export const getAttributeList = (data) => {
  return axios.request({
    url: '/product/property/package/list',
    method: 'post',
    data: data
  })
}

// 新增属性
export const addAttribute = (data) => {
  return axios.request({
    url: '/product/property/package/create',
    method: 'post',
    data: data
  })
}

// 编辑属性
export const editAttribute = (data) => {
  return axios.request({
    url: '/product/property/package/edit',
    method: 'post',
    data: data
  })
}

// 删除属性
export const delAttribute = (data) => {
  return axios.request({
    url: '/product/property/package/delete',
    method: 'post',
    data: data
  })
}

// 查看属性详情
export const detailAttribute = (data) => {
  return axios.request({
    url: '/product/property/package/get',
    method: 'post',
    data: data
  })
}

// 参数列表
export const getParamsList = (data) => {
  return axios.request({
    url: '/product/property/list',
    method: 'post',
    data: data
  })
}

// 新增参数
export const addParams = (data) => {
  return axios.request({
    url: '/product/property/create',
    method: 'post',
    data: data
  })
}

// 编辑参数
export const editParams = (data) => {
  return axios.request({
    url: '/product/property/edit',
    method: 'post',
    data: data
  })
}

// 查看参数
export const detailParams = (data) => {
  return axios.request({
    url: '/product/property/get',
    method: 'post',
    data: data
  })
}

// 删除参数
export const delParams = (data) => {
  return axios.request({
    url: '/product/property/delete',
    method: 'post',
    data: data
  })
}

// 品牌列表
export const getBrandList = (data) => {
  return axios.request({
    url: '/product/brand/list',
    method: 'post',
    data: data
  })
}

// 品牌新增
export const addBrand = (data) => {
  return axios.request({
    url: '/product/brand/create',
    method: 'post',
    data: data
  })
}

// 品牌查看
export const detailBrand = (data) => {
  return axios.request({
    url: '/product/brand/get',
    method: 'post',
    data: data
  })
}

// 品牌编辑
export const editBrand = (data) => {
  return axios.request({
    url: '/product/brand/edit',
    method: 'post',
    data: data
  })
}

// 品牌删除
export const delBrand = (data) => {
  return axios.request({
    url: '/product/brand/delete',
    method: 'post',
    data: data
  })
}

// 商品回收站
export const getRecycleList = (data) => {
  return axios.request({
    url: '/product/goods/recyclebin/list',
    method: 'post',
    data: data
  })
}

// 商品还原
export const productRecover = (data) => {
  return axios.request({
    url: '/product/goods/recyclebin/recover',
    method: 'post',
    data: data
  })
}

// 获取所属分类
export const kindList = (data) => {
  return axios.request({
    url: '/product/kind/list',
    method: 'post',
    data: data
  })
}

// 获取日志列表
export const getLogList = (data) => {
  return axios.request({
    url: '/product/goods/log/list',
    method: 'post',
    data: data
  })
}

// 获取变更字段列表
export const getUpdateList = (data) => {
  return axios.request({
    url: '/product/goods/log/column/list',
    method: 'post',
    data: data
  })
}

// 日志导出
export const exportLogList = (data) => {
  return axios.request({
    url: '/product/goods/log/export',
    method: 'post',
    data: data
  })
}

// 兑换商品管理列表
export const exchangeList = (data) => {
  return axios.request({
    url: '/product/channel/coupon/goods/list',
    method: 'post',
    data: data
  })
}

// 兑换商品上架与下架
export const exchangeUp = (data) => {
  return axios.request({
    url: '/product/channel/coupon/status/update',
    method: 'post',
    data: data
  })
}

// 兑换商品上架中的列表
export const couponList = (data) => {
  return axios.request({
    url: '/product/channel/coupon/list',
    method: 'post',
    data: data
  })
}

// 兑换商品的创建(上架)
export const exchangeAdd = (data) => {
  return axios.request({
    url: '/product/channel/coupon/create',
    method: 'post',
    data: data
  })
}

// 会员列表
export const memberList = (data) => {
  return axios.request({
    url: '/merchant/member/level/query',
    // url: 'http://10.100.50.52:8215/merchant/member/level/query',
    method: 'post',
    data: data
  })
}

// 门店商品上下架列表
export const goodsShopList = (data) => {
  return axios.request({
    url: '/product/goods/shop/statistics',
    method: 'post',
    data: data
  })
}

// 渠道
export const getChannelList = (data) => {
  return axios.request({
    url: '/product/channel/list',
    method: 'post',
    data: data
  })
}

// 渠道商品列表
export const getGoodsList = (data) => {
  return axios.request({
    url: '/product/channel/goods/list',
    method: 'post',
    data: data
  })
}

// 系统商品
export const sysGoodsList = (data) => {
  return axios.request({
    url: '/product/system/goods/list',
    method: 'post',
    data: data
  })
}

// 显示与隐藏与下架
export const getIsShow = (data) => {
  return axios.request({
    url: '/product/channel/goods/edit',
    method: 'post',
    data: data
  })
}

// 重新上架
export const recoverUp = (data) => {
  return axios.request({
    url: '/product/channel/goods/reput',
    method: 'post',
    data: data
  })
}

// 小商品上架
export const retailGoodsUp = (data) => {
  return axios.request({
    url: '/product/channel/goods/create',
    method: 'post',
    data: data
  })
}

// 显示拖拽排序功能
export const sortGoodsList = (data) => {
  return axios.request({
    url: '/product/channel/goods/sort',
    method: 'post',
    data: data
  })
}

// 渠道商品详情
export const getChannelDetail = (data) => {
  return axios.request({
    url: '/product/channel/goods/get',
    method: 'post',
    data: data
  })
}
